<?php
	$url = "#allDeals/";
	if(isset($filter)) {
		$url .= "filter/".$filter."/";
	}
	if(isset($sortby)) {
		$url .= "sortby/$sortby/";	
	}
	$url.="page/";
?>

						<ul class="breadcrumb well">
						    <li><a href="#">Контент</a> <span class="divider">/</span></li>
						    <li class="active">Акции на сайте</li>
					    </ul>

						<div class="content well content-wide">
					    	    <table class="table table-bordered table-hover">
					    	    	<thead>
										<tr>
											<td>ID</td>
											<td>Название предложения</td>
											<td>Тип</td>
											<td>Город</td>
											<td>Дата добавления</td>
											<td>Менеджер</td>
											<td class="muted">Операции</td>
										</tr>
									</thead>

									<tbody>

										<?php foreach($deals as $deal){ ?>
										<tr class="text-normal">
											<td><?php echo $deal->id; ?></td>
											<td><?php echo $deal->dealname; ?></td>
											<td><?php echo idToCouponType($deal->coupontype); ?></td>
											<td><?php echo $deal->city; ?></td>
											<td><?php echo $deal->dealstartdate; ?></td>
											<td><?php echo $deal->manager; ?></td>
											
											<td class="muted">
												<div class="dropdown">
								    				<a class="dropdown-toggle btn" data-toggle="dropdown">Операции <b class="caret"></b> </a>
								    					<ul class="dropdown-menu">
								    						<li><a href="#addADeal/id/<?php echo $deal->id;?>"><i class="icon-eye-open"></i> Начать добавление</a></li>
														</ul>
							    				</div>
											</td>
										</tr>
										<?php }?>
									</tbody>

    							</table>
					    </div> <!-- /content -->

					    
					    <!-- pagination -->
					    <?php include("pagination.php");?>